Skip to content

Emit less garbage without opts, if it has no side effects#1141

Open
Frotty wants to merge 6 commits intomasterfrom
less-garbage
Open

Emit less garbage without opts, if it has no side effects#1141
Frotty wants to merge 6 commits intomasterfrom
less-garbage

Conversation

@Frotty
Copy link
Member

@Frotty Frotty commented Jan 14, 2026

No description provided.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 044797f8e8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Frotty
Copy link
Member Author

Frotty commented Feb 25, 2026

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f419f6b8e6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Frotty
Copy link
Member Author

Frotty commented Feb 25, 2026

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 009ce6c63d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +205 to +207
if (mayTrapAtRuntime(expr)) {
return Collections.singletonList(expr);
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Analyze callee bodies before deleting dead-store RHS

collectSideEffects now deletes unread assignments unless mayTrapAtRuntime(expr) or hasObservableSideEffects(expr, ...) is true, but the trap check is only intra-expression and does not look into called function bodies. This means a pure wrapper call like wrap(y) (where wrap contains 1 div y) can now be removed entirely, silently dropping a potential divide-by-zero trap and changing runtime behavior; previously the RHS was always preserved. Please make trap detection interprocedural (or conservatively keep calls whose bodies may trap) before replacing with an empty statement.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant